home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / windows / sb501.zip / SETUP.SCR < prev    next >
Text File  |  1997-01-19  |  40KB  |  835 lines

  1. //
  2. // Setup Installation File
  3. // Created by Setup Builder Version 5.01.001/32
  4. //
  5. // Copyright ⌐ 1993 - 1997 GPP Software
  6. //
  7. // Created: 19-01-1997 at 12:49:25
  8. //
  9. //
  10. // Setup procedure for installing/de-installing:
  11. //
  12. // SETUP / SETUP BUILDER
  13. //
  14.  
  15.  
  16. // Application Variables
  17. SET %Caption%="Setup"
  18. SET %Application%="Setup Builder"
  19. SET %Company%="GPPSoftware"
  20. SET %InstallPath%="C:\SETUP"
  21. SET %InstallDrive%="C:"
  22. SET %Option%=1
  23. SET %Option1%=TRUE
  24. SET %IniFile%="BLDR16.INI"
  25. IF "#INSTVER#"=="INST16" GetProfileString("Install", "Path", "%InstallPath%", "%IniFile%", %InstallPath%)
  26. IF "#INSTVER#"=="INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Path", "%InstallPath%", %InstallPath%)
  27. AddChar(%InstallPath%, "\")
  28.  
  29.  
  30. // Language
  31. SetLanguage("UkEnglish")
  32.  
  33.  
  34. // Copy all the bitmaps
  35. CopyFile("GPSOFT3.BM_","%WindowsDirectory%TEMP\GPSOFT3.BMP")
  36. CopyFile("DIAMOND.BM_","%WindowsDirectory%TEMP\DIAMOND.BMP")
  37.  
  38.  
  39. // Create all the objects
  40. CreateBackdrop("DEFAULTBACKDROP")
  41. CreateControl("Text","%Application% Setup",-1,20,10,0,0,1048576,"Times New Roman",50,3,16777215,0)
  42. CreateControl("Text","Install/De-Install created using Setup Builder Version 5.01.001/32|Copyright ⌐ 1993 - 1997 GPP Software|",-1,20,0,0,0,1114112,"Times New Roman",17,3,16777215,0)
  43. EndObject()
  44.  
  45.  
  46. CreateCueCard("WELCOMECARD",20,50,310,200,2)
  47. CreateControl("Text","%Application%",-1,20,20,150,45,0,"Times New Roman",50,0,10485760,0)
  48. CreateControl("ColourBlock","",-1,20,70,270,5,0,128)
  49. CreateControl("Text","Welcome to %Application%, the foremost|Software Setup building tool from:",-1,25,95,150,45,0,"Times New Roman",17,0,0,0)
  50. CreateControl("Bitmap","%WindowsDirectory%TEMP\GPSOFT3.BMP",-1,25,148,150,45,0)
  51. EndObject()
  52.  
  53.  
  54. CreateCueCard("PROMO1",20,50,400,210,2)
  55. CreateControl("Text","Ease Of Use Designed In!",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  56. CreateControl("ColourBlock","",-1,20,50,270,5,0,128)
  57. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,90,150,45,0)
  58. CreateControl("Text","No programming is required for simple installs",-1,50,90,150,45,0,"Times New Roman",17,0,0,0)
  59. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  60. CreateControl("Text","You don't need to be a programmer to use %Application%",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  61. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,150,150,45,0)
  62. CreateControl("Text","Create simple installs in less than 10 minutes!",-1,50,150,150,45,0,"Times New Roman",17,0,0,0)
  63. EndObject()
  64.  
  65.  
  66. CreateCueCard("PROMO2",20,50,360,230,2)
  67. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  68. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  69. CreateControl("Text","%Application% now supports:",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  70. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  71. CreateControl("Text","User defined Backdrops",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  72. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  73. CreateControl("Text","User defined Dialogs",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  74. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,140,150,45,0)
  75. CreateControl("Text","User defined Cue Cards/Bill Boards",-1,50,140,150,45,0,"Times New Roman",17,0,0,0)
  76. CreateControl("Text","All are completely configureable by the user using the",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  77. CreateControl("Text","%Application% in-built Project Object Designer",-1,25,190,150,45,0,"Times New Roman",17,0,0,0)
  78. EndObject()
  79.  
  80.  
  81. CreateCueCard("PROMO3",20,50,360,235,2)
  82. CreateControl("Text","16 and 32 Bit Support",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  83. CreateControl("ColourBlock","",-1,20,50,235,5,0,128)
  84. CreateControl("Text","%Application% now supports:",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  85. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  86. CreateControl("Text","Dual 16/32 bit platform installations",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  87. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,125,150,45,0)
  88. CreateControl("Text","Windows 95/NT Registry",-1,50,125,150,45,0,"Times New Roman",17,0,0,0)
  89. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,150,150,45,0)
  90. CreateControl("Text","Windows 95/NT Shared File Registry",-1,50,150,150,45,0,"Times New Roman",17,0,0,0)
  91. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,175,150,12,0)
  92. CreateControl("Text","Windows 95/NT Long File Names",-1,50,175,150,45,0,"Times New Roman",17,0,0,0)
  93. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,200,150,12,0)
  94. CreateControl("Text","OLE Control Registration",-1,50,200,150,12,0,"MS Sans Serif",17,0,0,0)
  95. EndObject()
  96.  
  97.  
  98. CreateCueCard("PROMO4",20,50,400,230,2)
  99. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  100. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  101. CreateControl("Text","Try %Application%'s Optional Installations facilty!",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  102. CreateControl("Text","Optional Installations allow you to create installs for your",-1,25,100,150,45,0,"Times New Roman",17,0,0,0)
  103. CreateControl("Text","customers which give them the choice of which components",-1,25,120,150,45,0,"Times New Roman",17,0,0,0)
  104. CreateControl("Text","of your software to install.",-1,25,140,150,45,0,"Times New Roman",17,0,0,0)
  105. CreateControl("Text","You can create up to 15 different options with any",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  106. CreateControl("Text","name you wish to give them!",-1,25,190,150,45,0,"Times New Roman",17,0,0,0)
  107. EndObject()
  108.  
  109.  
  110. CreateCueCard("PROMO5",20,50,330,210,2)
  111. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  112. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  113. CreateControl("Text","Plus lots lots more!",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  114. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  115. CreateControl("Text","Complete new MDI user interface",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  116. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  117. CreateControl("Text","Many new script language enhancements",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  118. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,140,150,45,0)
  119. CreateControl("Text","Better multitasking",-1,50,140,150,45,0,"Times New Roman",17,0,0,0)
  120. CreateControl("Text","In fact, many of the things you have asked for!",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  121. EndObject()
  122.  
  123.  
  124. // Close Setup Program
  125. HideSetup()
  126.  
  127.  
  128. // Display appropriate backdrop
  129. GetScreenWidth(%Width%)
  130. SET %BackDrop%="DEFAULTBACKDROP"
  131. IF "%BackDrop%" != "(None)" ShowBackdrop("%BackDrop%")
  132.  
  133.  
  134. // Determine if s/w is already installed
  135. SET %DoUpgrade% = FALSE
  136. IF "#INSTVER#"=="INST16" GetProfileString("Install", "DeInstallScript", "%InstallPath%DEINST.INF", "%IniFile%", %DeInstall%)
  137. IF "#INSTVER#"=="INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DeInstallScript", "%InstallPath%DEINST.INF", %DeInstall%)
  138. IF "#INSTVER#"=="INST16" GetProfileString("Install", "Installed", "0", "%IniFile%", %Installed%)
  139. IF "#INSTVER#"=="INST32" RegGetInt(2, "SOFTWARE\%Company%\%Application%\Install", "Installed", 0, %Installed%)
  140. IF %Installed% != 0 GOTO :GOTVERSION
  141. SET %DoUpgrade% = TRUE
  142. SET %DeInstall% = "%InstallPath%DEINST.INF"
  143. CheckExists("%DeInstall%")
  144. SET %Installed% = %ERROR%
  145. IF %ERROR% == TRUE GOTO :GOTVERSION
  146. SET %DeInstall% = "%InstallPath%DEINST.SCR"
  147. CheckExists("%DeInstall%")
  148. SET %Installed% = %ERROR%
  149. IF %ERROR% == TRUE GOTO :GOTVERSION
  150. SET %DeInstall% = "%InstallPath%Setup.SCR"
  151. CheckExists("%DeInstall%")
  152. SET %Installed% = %ERROR%
  153. :GOTVERSION
  154.  
  155.  
  156. // User defined code - initialisation
  157. // Find out what is or is not installed so we
  158. // can prompt the user with what still needs installing
  159. CheckExists("%InstallPath%*.EXE")
  160. SET %Option1% = NOT %ERROR%
  161.  
  162. CheckExists("%InstallPath%SAMPLES\*.*")
  163. SET %Option2% = NOT %ERROR%
  164.  
  165. CheckExists("%InstallPath%OBJECTS\*.*")
  166. SET %Option3% = NOT %ERROR%
  167.  
  168.  
  169.  
  170. // Welcome Dialog
  171. :BACK1
  172. SET %Message1%="Welcome to the %Application% Installation Program."
  173. SET %Message2%="This program will install the %Application% software in the directory you specify on your hard disk."
  174. SET %Message3%="(Compuserve ID: 100105,536)||Setup is supplied with the Setup Builder|software and is the copyright of G.Plowman"
  175. DialogBox("Welcome")
  176. IF %ERROR% == IDCANCEL GOTO :EXIT
  177.  
  178.  
  179. // Installation options
  180. CreateDialog("OPTIONS","%Caption%",0,0,260,140)
  181. CreateControl("GroupBox","",-1,6,6,248,110,0)
  182. CreateControl("Icon","Setup",-1,15,20,0,0,0)
  183. CreateControl("Text","Please make a selection from the following options:",-1,60,30,170,24,0,"MS Sans Serif",15,0,0,0)
  184. CreateControl("CheckBox","Install the %Application% software",100,38,46,180,14,0,%Option1%)
  185. CreateControl("CheckBox","Install Sample Objects",101,38,66,180,14,0,%Option2%)
  186. CreateControl("CheckBox","Install General Samples",102,38,86,180,14,0,%Option3%)
  187. CreateControl("Button","&Continue",IDOK,81,123,54,14,0)
  188. CreateControl("Button","&Back",IDBACK,140,123,54,14,0)
  189. CreateControl("Button","E&xit",IDCANCEL,199,123,54,14,0)
  190. CentreDialog()
  191. SetFocus(IDOK)
  192. EndObject()
  193.  
  194. :BACK2
  195. DialogBox("OPTIONS")
  196. IF %ERROR% == IDBACK GOTO :BACK1
  197. IF %ERROR% == IDCANCEL GOTO :EXIT
  198. SET %Option%=0
  199. SET %Option%=%Option% + %Option3%
  200. SET %Option%=%Option% * 2
  201. SET %Option%=%Option% + %Option2%
  202. SET %Option%=%Option% * 2
  203. SET %Option%=%Option% + %Option1%
  204.  
  205.  
  206. // Sort out where to install the software
  207. // but only if the software isn't already installed
  208. AddChar(%InstallPath%, "\")
  209. SET %MakeDir% = %InstallPath%
  210. SET %Temp% = Len(%MakeDir%)
  211. IF %Temp% > 3 SET %Temp% = %Temp% - 1
  212. SET %MakeDir% = Left(%MakeDir%, %Temp%)
  213. IF %Installed% == TRUE GOTO :INSTALLED
  214.  
  215.  
  216. // Ask the user where to install the software
  217. // but only if the software isn't already installed
  218. :RETRY
  219. SET %Message1%="The install program will copy the %Application% files into the following directory:"
  220. DialogBox("AskPath")
  221. IF %ERROR% == IDBACK GOTO :BACK2
  222. IF %ERROR% == IDCANCEL GOTO :EXIT
  223.  
  224. // Create installation directory
  225. AddChar(%InstallPath%, "\")
  226. SET %MakeDir% = %InstallPath%
  227. SET %Temp% = Len(%MakeDir%)
  228. IF %Temp% > 3 SET %Temp% = %Temp% - 1
  229. SET %MakeDir% = Left(%MakeDir%, %Temp%)
  230. MkDir(%MakeDir%)
  231. IsWriteable(%MakeDir%)
  232. IF %ERROR% == FALSE GOTO :DIRERROR
  233.  
  234.  
  235. // Save the installation directory/de-install script
  236. :INSTALLED
  237. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "Path", "%MakeDir%", "%IniFile%")
  238. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Path", "%MakeDir%")
  239. SET %Temp% = ""
  240.  
  241.  
  242. // Upgrade the de-install if required
  243. IF %DoUpgrade% == FALSE GOTO :NODEINSTUPG
  244. SET %Temp% = "%DeInstall%"
  245. SET %DeInstall% = "%WindowsDirectory%GPPSOFT\Setup.001"
  246. GetBackupName("%DeInstall%", %DeInstall%)
  247. IF %Installed% == FALSE GOTO :NODEINSTUPG
  248. Open("%DeInstall%", 10, WRITE)
  249. WriteLine(10, "//$FILES$")
  250. Close(10)
  251. CopyFile("%Temp%","%DeInstall%",0,1,1)
  252. :NODEINSTUPG
  253.  
  254. SET %DoUpgrade% = ""
  255. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "DeInstallScript", "%DeInstall%", "%IniFile%")
  256. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DeInstallScript", "%DeInstall%")
  257. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "Installed", "1", "%IniFile%")
  258. IF "#INSTVER#"=="INST32" RegWriteInt(2, "SOFTWARE\%Company%\%Application%\Install", "Installed", 1)
  259.  
  260. WriteProfileString("%Application%", "Version", "1", "DEINST.INI")
  261. WriteProfileString("%Application%", "DeInstallScript", "%DeInstall%", "DEINST.INI")
  262. WriteProfileString("%Application%", "Cmd", "%WindowsDirectory%GPPSOFT\#INSTVER#.EXE", "DEINST.INI")
  263.  
  264.  
  265. Set %MakeDir% = "%InstallPath%SAMPLES"
  266. MkDir("%MakeDir%")
  267. IsWriteable(%MakeDir%)
  268. IF %ERROR% == FALSE GOTO :DIRERROR
  269. Set %MakeDir% = "%InstallPath%OBJECTS"
  270. MkDir("%MakeDir%")
  271. IsWriteable(%MakeDir%)
  272. IF %ERROR% == FALSE GOTO :DIRERROR
  273. SET %MakeDir% = ""
  274.  
  275.  
  276. // User defined code - pre file copying
  277. // Save the install version
  278. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "Version", "5.01.000", "%IniFile%")
  279. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "DefaultBackdrop", "%InstallPath%OBJECTS\DEFAULT.BKD", "%IniFile%")
  280. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Version", "5.01.000")
  281. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DefaultBackdrop", "%InstallPath%OBJECTS\DEFAULT.BKD")
  282.  
  283. // Make the temporary directory
  284. MkDir("%WindowsDirectory%TEMP")
  285. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "TempPath", "%WindowsDirectory%TEMP", "%IniFile%")
  286. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "TempPath", "%WindowsDirectory%TEMP")
  287.  
  288. // Set the copy dialog position for small screens so that
  289. // the user can see the cue cards
  290. GetScreenWidth(%Width%)
  291. IF %Width% <= 800 CentreDialog(2, 2)
  292.  
  293.  
  294.  
  295. // Setup the de-install procedure
  296. OpenDeInstall("%DeInstall%")
  297. AddDeInstall("$STARTUP$","Set ^037Caption^037=^034Setup^034")
  298. AddDeInstall("$STARTUP$","Set ^037Application^037=^034Setup Builder^034")
  299. AddDeInstall("$STARTUP$","Set ^037Company^037=^034GPPSoftware^034")
  300. AddDeInstall("$STARTUP$","Set ^037InstallPath^037=^034%InstallPath%^034")
  301. AddDeInstall("$STARTUP$","Set ^037InstallDrive^037=^034%InstallDrive%^034")
  302. AddDeInstall("$STARTUP$","MessageBox(^034The %Application% software is about to be removed from your machine.^^013^^013All files, directories and the appropriate Program Manager Group will be deleted.^^013^^013Are you sure you wish to continue ?^034, ^034%Caption%^034, MB_YESNO, MB_ICONQUESTION)")
  303. AddDeInstall("$STARTUP$","IF %%ERROR%% == IDYES GOTO :DODELETE")
  304. AddDeInstall("$STARTUP$","Set ^037Message1^037 = ^034De-installation aborted - the %Application% software has not been deinstalled.^034")
  305. AddDeInstall("$STARTUP$","Set ^037Message2^037 = ^034^034")
  306. AddDeInstall("$STARTUP$","DialogBox(^34OKBOX^34)")
  307. AddDeInstall("$STARTUP$","GOTO :END")
  308. AddDeInstall("$STARTUP$",":DODELETE")
  309.  
  310. AddDeInstall("$USERSCRIPT$","// Remove older version's files")
  311. AddDeInstall("$USERSCRIPT$","Delete(^034^037WindowsDirectory^037DOSEXEC.PIF^034)")
  312. AddDeInstall("$USERSCRIPT$","")
  313. AddDeInstall("$USERSCRIPT$","// Remove extraneous files")
  314. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037SAMPLES\*.*^034)")
  315. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037OBJECTS\*.*^034)")
  316. AddDeInstall("$USERSCRIPT$","")
  317. AddDeInstall("$USERSCRIPT$","Delete(^034^037WindowsDirectory^037BUILDER.INI^034)")
  318. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037BUILDER.EXE^034)")
  319. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037INST.EXE^034)")
  320. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037SETUP.SCR^034)")
  321. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037LADMIN.EXE^034)")
  322. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037DIBAPI.DLL^034)")
  323. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037DIBAPI16.DLL^034)")
  324. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037TS.HLP^034)")
  325. AddDeInstall("$USERSCRIPT$","")
  326. AddDeInstall("$USERSCRIPT$","// Help file .GID files")
  327. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034^037InstallPath^037BUILDER.GID^034, 0, 0, 0, 0)")
  328. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034^037InstallPath^037SETUP.GID^034, 0, 0, 0, 0)")
  329. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034^037InstallPath^037TS.GID^034, 0, 0, 0, 0)")
  330. AddDeInstall("$USERSCRIPT$","Delete(^034^037InstallPath^037*.GID^034)")
  331. AddDeInstall("$USERSCRIPT$","")
  332. AddDeInstall("$USERSCRIPT$","// Finally file manager item")
  333. AddDeInstall("$USERSCRIPT$","IF ^034^094035INSTVER^094035^034 == ^034INST16^034 WriteProfileString(^034Extensions^034, ^034inf^034, ^034^034, ^034WIN.INI^034)")
  334. AddDeInstall("$USERSCRIPT$","IF ^034^094035INSTVER^094035^034 == ^034INST16^034 WriteProfileString(^034Extensions^034, ^034scr^034, ^034^034, ^034WIN.INI^034)")
  335.  
  336.  
  337. // Cleanup de-install script
  338. AddDeInstall("$DIRECTORIES$","RmDir(^034%InstallPath%OBJECTS^034)")
  339. AddDeInstall("$DIRECTORIES$","RmDir(^034%InstallPath%SAMPLES^034)")
  340. AddDeInstall("$CLEANUP$","SET ^037Len^037 = Len(^034^037InstallPath^037^034) - 1")
  341. AddDeInstall("$CLEANUP$","SET ^037InstTemp^037 = Left(^034^037InstallPath^037^034, ^037Len^037)")
  342. AddDeInstall("$CLEANUP$","RmDir(^034^037InstTemp^037^034)")
  343. AddDeInstall("$CLEANUP$","Delete(^034%WindowsDirectory%%IniFile%^034)")
  344. AddDeInstall("$CLEANUP$","IF ^34^35^35INSTVER^35^35^34==^34INST32^34 RegDeleteSetting(2, ^34SOFTWARE\%Company%\%Application%^34, ^34^34)")
  345. AddDeInstall("$CLEANUP$","SET ^037Message1^037 = ^034The %Application% software has been successfully de-installed.^034")
  346. AddDeInstall("$CLEANUP$","SET ^037Message2^037 = ^034To re-install the %Application% software you should re-run this installation program.^034")
  347. AddDeInstall("$CLEANUP$","DialogBox(^34OKBOX^34)")
  348. AddDeInstall("$CLEANUP$","WriteProfileString(^34%Application%^34,^34Continue^34,^0341^34,^34DEINST.INI^34)")
  349. AddDeInstall("$CLEANUP$",":END")
  350.  
  351.  
  352. // Check for space availability
  353. GetDiskSpace(%InstallDrive%)
  354. SET %Space%=%ERROR%
  355. SET %Required%=0
  356. IF %Option1%==TRUE SET %Required%=%Required% + 2832384
  357. IF %Option2%==TRUE SET %Required%=%Required% + 12288
  358. IF %Option3%==TRUE SET %Required%=%Required% + 45056
  359. IF %Space% >= %Required% GOTO :GOTSPACE
  360. MessageBox("The %Application% software requires %Required% bytes of disk space and there is only %Space% bytes free on your %InstallDrive% drive.||Do you wish to continue to install the software ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  361. IF %ERROR% == IDNO GOTO :EXIT
  362. :GOTSPACE
  363.  
  364.  
  365. // Do the file copying
  366. SET %TotalBlocks%=0
  367. IF %Option% AND 1 != 0 SET %TotalBlocks% = %TotalBlocks% + 23
  368. IF %Option% AND 2 != 0 SET %TotalBlocks% = %TotalBlocks% + 10
  369. IF %Option% AND 4 != 0 SET %TotalBlocks% = %TotalBlocks% + 9
  370. CopyFile(%TotalBlocks%)
  371. Release()
  372. IF %Option% AND 1==0 GOTO :OVER1
  373. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  374. IF %ERROR% == IDCANCEL GOTO :EXIT
  375. AddDeInstall("$FILES$","Delete(^034%InstallPath%SETUP.EXE^034)")
  376. ShowCueCard("WELCOMECARD")
  377. "SETUP.EXE", "%InstallPath%", "Copying: Interpreter Executable", TRUE
  378. :OVER1
  379. Release()
  380. IF %Option% AND 1==0 GOTO :OVER2
  381. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  382. IF %ERROR% == IDCANCEL GOTO :EXIT
  383. AddDeInstall("$FILES$","Delete(^034%InstallPath%INST16.EXE^034)")
  384. "INST16.EX_", "%InstallPath%INST16.EXE", "Copying: 16-bit Interpreter Executable", TRUE
  385. :OVER2
  386. Release()
  387. IF %Option% AND 1==0 GOTO :OVER3
  388. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  389. IF %ERROR% == IDCANCEL GOTO :EXIT
  390. AddDeInstall("$FILES$","Delete(^034%InstallPath%INST32.EXE^034)")
  391. "INST32.EX_", "%InstallPath%INST32.EXE", "Copying: 32-bit Interpreter Executable", TRUE
  392. :OVER3
  393. Release()
  394. IF %Option% AND 1==0 GOTO :OVER4
  395. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  396. IF %ERROR% == IDCANCEL GOTO :EXIT
  397. AddDeInstall("$FILES$","Delete(^034%InstallPath%CLEANUP.EXE^034)")
  398. ShowCueCard("PROMO1")
  399. "CLEANUP.EXE", "%InstallPath%", "Copying: Interpreter Executable", TRUE
  400. :OVER4
  401. Release()
  402. IF %Option% AND 1==0 GOTO :OVER5
  403. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  404. IF %ERROR% == IDCANCEL GOTO :EXIT
  405. AddDeInstall("$FILES$","Delete(^034%InstallPath%DEINST.EXE^034)")
  406. "DEINST.EXE", "%InstallPath%", "Copying: De-Installer Executable", TRUE
  407. :OVER5
  408. Release()
  409. IF %Option% AND 1==0 GOTO :OVER6
  410. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  411. IF %ERROR% == IDCANCEL GOTO :EXIT
  412. AddDeInstall("$FILES$","Delete(^034%InstallPath%BLDR16.EXE^034)")
  413. "BLDR16.EX_", "%InstallPath%BLDR16.EXE", "Copying: Setup Builder 16-bit Executable", TRUE
  414. :OVER6
  415. Release()
  416. IF %Option% AND 1==0 GOTO :OVER7
  417. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  418. IF %ERROR% == IDCANCEL GOTO :EXIT
  419. AddDeInstall("$FILES$","Delete(^034%InstallPath%BLDR32.EXE^034)")
  420. "BLDR32.ex_", "%InstallPath%BLDR32.EXE", "Copying: Setup Builder 32-bit Executable", TRUE
  421. :OVER7
  422. Release()
  423. IF %Option% AND 1==0 GOTO :OVER8
  424. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  425. IF %ERROR% == IDCANCEL GOTO :EXIT
  426. AddDeInstall("$FILES$","Delete(^034%InstallPath%BUILDER.HLP^034)")
  427. "BUILDER.HL_", "%InstallPath%BUILDER.HLP", "Copying: Setup Builder Help File", TRUE
  428. :OVER8
  429. Release()
  430. IF %Option% AND 1==0 GOTO :OVER9
  431. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  432. IF %ERROR% == IDCANCEL GOTO :EXIT
  433. AddDeInstall("$FILES$","Delete(^034%InstallPath%SETUP.HLP^034)")
  434. ShowCueCard("PROMO2")
  435. "SETUP.HL_", "%InstallPath%SETUP.HLP", "Copying: Setup Script Language Help File", TRUE
  436. :OVER9
  437. Release()
  438. IF %Option% AND 1==0 GOTO :OVER10
  439. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  440. IF %ERROR% == IDCANCEL GOTO :EXIT
  441. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMPRESS.EXE^034)")
  442. "COMPRESS.EX_", "%InstallPath%COMPRESS.EXE", "Copying: Compression Utility", TRUE
  443. :OVER10
  444. Release()
  445. IF %Option% AND 1==0 GOTO :OVER11
  446. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  447. IF %ERROR% == IDCANCEL GOTO :EXIT
  448. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMPRESS.TXT^034)")
  449. "COMPRESS.TX_", "%InstallPath%COMPRESS.TXT", "Copying: Compression Utility", TRUE
  450. :OVER11
  451. Release()
  452. IF %Option% AND 1==0 GOTO :OVER12
  453. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  454. IF %ERROR% == IDCANCEL GOTO :EXIT
  455. AddDeInstall("$FILES$","Delete(^034%InstallPath%DOSEXEC.PIF^034)")
  456. ShowCueCard("PROMO3")
  457. "DOSEXEC.PIF", "%InstallPath%", "Copying: PIF File", TRUE
  458. :OVER12
  459. SET %Skip%=0
  460. Release()
  461. IF %Option% AND 1==0 GOTO :OVER13
  462. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  463. IF %ERROR% == IDCANCEL GOTO :EXIT
  464. AddDeInstall("$FILES$","Delete(^034%InstallPath%IMPORT.INI^034)")
  465. SET %Skip%=1
  466. SetGaugeText("Copying: Third Party Components Configuration File", "%CurrentDirectory%IMPORT.IN_", "%InstallPath%IMPORT.INI")
  467. ConfirmOverwrite("%InstallPath%IMPORT.INI", "%CurrentDirectory%IMPORT.IN_", "", 0)
  468. IF %ERROR% == IDNO GOTO :OVER13
  469. "IMPORT.IN_", "%InstallPath%IMPORT.INI", "Copying: Third Party Components Configuration File", TRUE
  470. SET %Skip%=0
  471. :OVER13
  472. UpdateGauge(%Skip%)
  473. Release()
  474. IF %Option% AND 1==0 GOTO :OVER14
  475. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  476. IF %ERROR% == IDCANCEL GOTO :EXIT
  477. AddDeInstall("$FILES$","Delete(^034%InstallPath%PRNT.BAT^034)")
  478. "PRNT.BAT", "%InstallPath%", "Copying: Registration Support File", TRUE
  479. :OVER14
  480. Release()
  481. IF %Option% AND 1==0 GOTO :OVER15
  482. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  483. IF %ERROR% == IDCANCEL GOTO :EXIT
  484. AddDeInstall("$FILES$","Delete(^034%InstallPath%LADMIN16.EXE^034)")
  485. "LADMIN16.EX_", "%InstallPath%LADMIN16.EXE", "Copying: License Administration Utility", TRUE
  486. :OVER15
  487. Release()
  488. IF %Option% AND 1==0 GOTO :OVER16
  489. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  490. IF %ERROR% == IDCANCEL GOTO :EXIT
  491. AddDeInstall("$FILES$","Delete(^034%InstallPath%LADMIN32.EXE^034)")
  492. "LADMIN32.EX_", "%InstallPath%LADMIN32.EXE", "Copying: License Administration Utility", TRUE
  493. :OVER16
  494. Release()
  495. IF %Option% AND 1==0 GOTO :OVER17
  496. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  497. IF %ERROR% == IDCANCEL GOTO :EXIT
  498. AddDeInstall("$FILES$","Delete(^034%InstallPath%ORDERAUS.TXT^034)")
  499. "ORDERAUS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  500. :OVER17
  501. Release()
  502. IF %Option% AND 1==0 GOTO :OVER18
  503. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  504. IF %ERROR% == IDCANCEL GOTO :EXIT
  505. AddDeInstall("$FILES$","Delete(^034%InstallPath%ORDERUK.TXT^034)")
  506. "ORDERUK.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  507. :OVER18
  508. Release()
  509. IF %Option% AND 1==0 GOTO :OVER19
  510. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  511. IF %ERROR% == IDCANCEL GOTO :EXIT
  512. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMMENTS.TXT^034)")
  513. "COMMENTS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  514. :OVER19
  515. Release()
  516. IF %Option% AND 1==0 GOTO :OVER20
  517. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  518. IF %ERROR% == IDCANCEL GOTO :EXIT
  519. AddDeInstall("$FILES$","Delete(^034%InstallPath%VENDORS.TXT^034)")
  520. "VENDORS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  521. :OVER20
  522. Release()
  523. IF %Option% AND 1==0 GOTO :OVER21
  524. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  525. IF %ERROR% == IDCANCEL GOTO :EXIT
  526. AddDeInstall("$FILES$","Delete(^034%InstallPath%INSTALL.TXT^034)")
  527. "INSTALL.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  528. :OVER21
  529. Release()
  530. IF %Option% AND 1==0 GOTO :OVER22
  531. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  532. IF %ERROR% == IDCANCEL GOTO :EXIT
  533. AddDeInstall("$FILES$","Delete(^034%InstallPath%README.TXT^034)")
  534. ShowCueCard("PROMO4")
  535. "README.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  536. :OVER22
  537. Release()
  538. IF %Option% AND 1==0 GOTO :OVER23
  539. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  540. IF %ERROR% == IDCANCEL GOTO :EXIT
  541. AddDeInstall("$FILES$","Delete(^034%InstallPath%FILE_ID.DIZ^034)")
  542. "FILE_ID.DIZ", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  543. :OVER23
  544. Release()
  545. IF %Option% AND 2==0 GOTO :OVER24
  546. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  547. IF %ERROR% == IDCANCEL GOTO :EXIT
  548. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\ASKPATH.DLG^034)")
  549. "ASKPATH.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  550. :OVER24
  551. Release()
  552. IF %Option% AND 2==0 GOTO :OVER25
  553. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  554. IF %ERROR% == IDCANCEL GOTO :EXIT
  555. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEFAULT.BKD^034)")
  556. "DEFAULT.BKD", "%InstallPath%OBJECTS\", "Copying: Default Object Files", TRUE
  557. :OVER25
  558. Release()
  559. IF %Option% AND 2==0 GOTO :OVER26
  560. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  561. IF %ERROR% == IDCANCEL GOTO :EXIT
  562. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEFAULT.CUE^034)")
  563. "DEFAULT.CUE", "%InstallPath%OBJECTS\", "Copying: Default Object Files", TRUE
  564. :OVER26
  565. Release()
  566. IF %Option% AND 2==0 GOTO :OVER27
  567. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  568. IF %ERROR% == IDCANCEL GOTO :EXIT
  569. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEINSTAL.DLG^034)")
  570. "DEINSTAL.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  571. :OVER27
  572. Release()
  573. IF %Option% AND 2==0 GOTO :OVER28
  574. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  575. IF %ERROR% == IDCANCEL GOTO :EXIT
  576. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DIALOG1.DLG^034)")
  577. "DIALOG1.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  578. :OVER28
  579. Release()
  580. IF %Option% AND 2==0 GOTO :OVER29
  581. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  582. IF %ERROR% == IDCANCEL GOTO :EXIT
  583. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DIALOG2.DLG^034)")
  584. "DIALOG2.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  585. :OVER29
  586. Release()
  587. IF %Option% AND 2==0 GOTO :OVER30
  588. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  589. IF %ERROR% == IDCANCEL GOTO :EXIT
  590. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\LICENSE.DLG^034)")
  591. "LICENSE.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  592. :OVER30
  593. Release()
  594. IF %Option% AND 2==0 GOTO :OVER31
  595. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  596. IF %ERROR% == IDCANCEL GOTO :EXIT
  597. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\OKBOX.DLG^034)")
  598. "OKBOX.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  599. :OVER31
  600. Release()
  601. IF %Option% AND 2==0 GOTO :OVER32
  602. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  603. IF %ERROR% == IDCANCEL GOTO :EXIT
  604. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\REGISTER.CUE^034)")
  605. ShowCueCard("PROMO5")
  606. "REGISTER.CUE", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  607. :OVER32
  608. Release()
  609. IF %Option% AND 2==0 GOTO :OVER33
  610. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  611. IF %ERROR% == IDCANCEL GOTO :EXIT
  612. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\WELCOME.DLG^034)")
  613. "WELCOME.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  614. :OVER33
  615. Release()
  616. IF %Option% AND 4==0 GOTO :OVER34
  617. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  618. IF %ERROR% == IDCANCEL GOTO :EXIT
  619. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\DIAMOND.BMP^034)")
  620. "DIAMOND.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  621. :OVER34
  622. Release()
  623. IF %Option% AND 4==0 GOTO :OVER35
  624. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  625. IF %ERROR% == IDCANCEL GOTO :EXIT
  626. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\PANEL.BMP^034)")
  627. "PANEL.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  628. :OVER35
  629. Release()
  630. IF %Option% AND 4==0 GOTO :OVER36
  631. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  632. IF %ERROR% == IDCANCEL GOTO :EXIT
  633. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\ROUNDPT.BMP^034)")
  634. "ROUNDPT.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  635. :OVER36
  636. Release()
  637. IF %Option% AND 4==0 GOTO :OVER37
  638. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  639. IF %ERROR% == IDCANCEL GOTO :EXIT
  640. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SQUAREPT.BMP^034)")
  641. "SQUAREPT.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  642. :OVER37
  643. Release()
  644. IF %Option% AND 4==0 GOTO :OVER38
  645. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  646. IF %ERROR% == IDCANCEL GOTO :EXIT
  647. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE1.SPJ^034)")
  648. "SAMPLE1.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  649. :OVER38
  650. Release()
  651. IF %Option% AND 4==0 GOTO :OVER39
  652. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  653. IF %ERROR% == IDCANCEL GOTO :EXIT
  654. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE2.SPJ^034)")
  655. "SAMPLE2.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  656. :OVER39
  657. Release()
  658. IF %Option% AND 4==0 GOTO :OVER40
  659. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  660. IF %ERROR% == IDCANCEL GOTO :EXIT
  661. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE3.INI^034)")
  662. "SAMPLE3.INI", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  663. :OVER40
  664. Release()
  665. IF %Option% AND 4==0 GOTO :OVER41
  666. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  667. IF %ERROR% == IDCANCEL GOTO :EXIT
  668. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE3.SCR^034)")
  669. "SAMPLE3.SCR", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  670. :OVER41
  671. Release()
  672. IF %Option% AND 4==0 GOTO :OVER42
  673. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  674. IF %ERROR% == IDCANCEL GOTO :EXIT
  675. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SETUP.SPJ^034)")
  676. "SETUP.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  677. :OVER42
  678. EndCopyFile()
  679. ShowCueCard("")
  680.  
  681.  
  682.  
  683.  
  684. // User defined code - post file copying
  685. // Reset dialog centering
  686. CentreDialog(3, 3)
  687.  
  688. // License - check for old versions first
  689. GetProfileString("License", "Registration", "", "BUILDER.INI", %LStr%)
  690. IF "%LStr%" == "" GOTO :NOBUILDER
  691. IF "#INSTVER#" == "INST16" WriteProfileString("License", "Registration", "%LStr%", "%IniFile%")
  692. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "%LStr%")
  693. :NOBUILDER
  694. IF "#INSTVER#" == "INST16" GetProfileString("License", "Registration", "", "%IniFile%", %LStr%)
  695. IF "#INSTVER#" == "INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "", %LStr%)
  696. IF "%LStr%" != "" GOTO :GOTIT
  697. GetLicense(%License%)
  698. IF "#INSTVER#" == "INST16" WriteProfileString("License", "Registration", "%License%", "%IniFile%")
  699. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "%License%")
  700. :GOTIT
  701.  
  702. // Tell Setup Builder where to find some files for creating install disks
  703. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Setup", "%InstallPath%setup.exe", "%IniFile%")
  704. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "DeInstall", "%InstallPath%deinst.exe", "%IniFile%")
  705. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Inst16", "%InstallPath%inst16.exe", "%IniFile%")
  706. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Inst32", "%InstallPath%inst32.exe", "%IniFile%")
  707. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Cleanup", "%InstallPath%cleanup.exe", "%IniFile%")
  708. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "ImportList", "%InstallPath%IMPORT.INI", "%IniFile%")
  709.  
  710. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Setup", "%InstallPath%setup.exe")
  711. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "DeInstall", "%InstallPath%deinst.exe")
  712. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Inst16", "%InstallPath%inst16.exe")
  713. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Inst32", "%InstallPath%inst32.exe")
  714. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Cleanup", "%InstallPath%cleanup.exe")
  715. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "ImportList", "%InstallPath%IMPORT.INI")
  716.  
  717. // Delete the old DOSEXEC.PIF to fix compression errors
  718. Delete("%WindowsDirectory%DOSEXEC.PIF")
  719.  
  720. // Delete old import file
  721. Delete("%WindowsDirectory%IMPORT.INI")
  722.  
  723.  
  724. // Now setup a new program manager group and its icons
  725. MessageBox("Setup can create a Program Manager group|for the %Application% application.||Do you wish to create a Program|Manager group and icons ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  726. Set %PmGrp% = %Error%
  727. IF %ERROR% == IDNO GOTO :NOPMGROUP
  728.  
  729. MakeGroup("%Application%", "")
  730. IF %Option% AND 1 != 0 MakeIcon("Setup Builder (16-bit)", "%InstallPath%BLDR16.EXE", "")
  731. IF %Option% AND 1 != 0 MakeIcon("Setup Builder (32-bit)", "%InstallPath%BLDR32.EXE", "")
  732. IF %Option% AND 1 != 0 MakeIcon("Setup Builder Help", "%InstallPath%BUILDER.HLP", "")
  733. IF %Option% AND 1 != 0 MakeIcon("Setup Script Help", "%InstallPath%SETUP.HLP", "")
  734. IF %Option% AND 1 != 0 MakeIcon("Install Notes", "%InstallPath%INSTALL.TXT", "")
  735. IF %Option% AND 1 != 0 MakeIcon("ReadMe", "%InstallPath%README.TXT", "")
  736. AddDeInstall("$PMGROUP$","DeleteGroup(^034%Application%^034)")
  737. :NOPMGROUP
  738.  
  739.  
  740. // Licensing
  741. :LICENSING
  742. IF "%IniFile%" == "" SET %IniFile%="Setup Builder.INI"
  743. SET %Message1% = "Please enter the following licensing information for the %Application% software:"
  744. DialogBox("License")
  745. IF %ERROR% == IDCANCEL GOTO :EXIT
  746. IF "#INSTVER#"=="INST16" WriteProfileString("License","UserName","%EF_1%","%IniFile%")
  747. IF "#INSTVER#"=="INST16" WriteProfileString("License","Company","%EF_2%","%IniFile%")
  748. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "UserName", "%EF_1%")
  749. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License". "Company", "%EF_2%")
  750.  
  751.  
  752. // User defined code - post PM group creation
  753. // Create some extra icons
  754. IF %PmGrp% == IDNO GOTO :NOICONS
  755. IF "#INSTVER#" == "INST16" MakeIcon("License Administrator", "%InstallPath%LADMIN16.EXE", "%IniFile%")
  756. IF "#INSTVER#" == "INST32" MakeIcon("License Administrator", "%InstallPath%LADMIN32.EXE", "%Application%")
  757. MakeIcon("Australian Order Form", "%InstallPath%PRNT.BAT", "%InstallPath%ORDERAUS.TXT")
  758. MakeIcon("UK Order Form", "%InstallPath%PRNT.BAT", "%InstallPath%ORDERUK.TXT")
  759. MakeIcon("Setup", "%CurrentDrive%\SETUP.EXE", "", "%InstallPath%SETUP.EXE")
  760. MakeIcon("Install", "%CurrentDrive%\INSTALL.EXE", "", "%InstallPath%SETUP.EXE")
  761.  
  762. // Delete unwanted icons
  763. DeleteIcon("Setup Builder")    // Remove old icon
  764. IF "#INSTVER#" == "INST16" DeleteIcon("Setup Builder (32-bit)")
  765. IF "#INSTVER#" == "INST32" DeleteIcon("Setup Builder (16-bit)")
  766. :NOICONS
  767.  
  768. // File association - Windows 3.x only
  769. IF "#INSTVER#" == "INST32" GOTO :NOASSOC
  770. MessageBox("Setup can install a file association|for File Manager with .SCR and .INF files.||Do you wish to install this association ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  771. IF %ERROR% == IDNO GOTO :NOASSOC
  772. IF "#INSTVER#" == "INST16" WriteProfileString("Extensions", "inf", "%InstallPath%inst16.exe ^.inf", "WIN.INI")
  773. IF "#INSTVER#" == "INST16" WriteProfileString("Extensions", "scr", "%InstallPath%inst16.exe ^.scr", "WIN.INI")
  774. :NOASSOC
  775.  
  776.  
  777. // Create the de-install icon
  778. IF %PmGrp% == IDYES MakeIcon("Un-Install %Application%", "%WindowsDirectory%GPPSOFT\DEINST.EXE", "%Application%")
  779.  
  780.  
  781. // Done
  782. :SUCCESS
  783. SET %Message1%="|%Application% installation has been successfully completed."
  784. SET %Message2%=""
  785. DialogBox("OkBox")
  786.  
  787.  
  788. // User defined code - installation completion
  789. MessageBox("Do you wish to view the|extra installation notes ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  790. IF %ERROR% == IDNO GOTO :NONOTES
  791.  
  792. WinExec("notepad.exe %InstallPath%README.TXT")
  793. :NONOTES
  794.  
  795. GOTO :END
  796.  
  797.  
  798. // User decided to quit
  799. :EXIT
  800. EndCopyFile()
  801. SET %Message1%="Installation has been terminated. You should re-run this installation program at a later time to install %Application%."
  802. SET %Message2%="|The %Application% software has not been installed."
  803. DialogBox("OkBox")
  804. GOTO :END
  805.  
  806.  
  807. // Error
  808. :ERROR
  809. EndCopyFile()
  810. SET %Message1%="An error occured during installation of the %Application% software."
  811. SET %Message2%="|The %Application% software has not been fully installed."
  812. DialogBox("OkBox")
  813. GOTO :END
  814.  
  815.  
  816. // Failed to create install directory
  817. :DIRERROR
  818. SET %Message1%="|Failed to create the installation directory '%MakeDir%'."
  819. SET %Message2%="|Unable to install the %Application% software in the specified directory."
  820. DialogBox("OkBox")
  821. GOTO :RETRY
  822.  
  823.  
  824. :END
  825. // Delete all the bitmaps
  826. Delete("%WindowsDirectory%TEMP\GPSOFT3.BMP")
  827. Delete("%WindowsDirectory%TEMP\DIAMOND.BMP")
  828.  
  829.  
  830. // Final tidy up - close files and remove components from H/D
  831. CloseDeInstall()
  832. Close()
  833. CheckExists("%CurrentDirectory%CLEANUP.EXE", "Please insert the diskette labelled 'DISK01'")
  834. IF %ERROR% == IDOK WinExec("%CurrentDirectory%CLEANUP.EXE")
  835.